Report Signal Graphic
To create a signal graphic use TPTReport.SignalGraphic()
. There are two ways to add signals to the graphic. Either you directly choose the signals to add using signalGraphic.add([signal1,signal2,...])
or indirectly by using a filter TPTReport.Filter()
(see Example 2).
By default, an automatic caption is displayed along with the graphic. This caption is formed by the names of the signals that are displayed in the table. To add a "custom" caption, use the function setCaption()
.
In this example, signals are added to the graphic using the #creates a new report section sect = TPTReport.Section("My Foo Bar Graphic Report Section") TPTReport.add(sect) #creates a new paragraph in the previously created section paragr = TPTReport.Paragraph("This is my foo bar graphic paragraph, where I can write custom text.") sect.add(paragr) #creates a new signal graphic with the signal foo and bar and a custom caption sect = TPTReport.Section("My Foo Bar Graphic Report Section") sig_graph = TPTReport.SignalGraphic() TPTReport.add(sig_graph) sig_graph.add([foo,bar]) sig_graph.setCaption("This is my custom caption.")
|